﻿using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;

namespace zwWitLink.Helper
{
    class ByteHelper
    {
        public static string GetBase64(string filepath)
        {
            FileStream fs = new FileStream(filepath, FileMode.Open, FileAccess.Read);

            byte[] byteFile = new byte[fs.Length];

            fs.Read(byteFile, 0, Convert.ToInt32(fs.Length));

            fs.Close();

           return Convert.ToBase64String(byteFile);

        }
    }
}
